package com.yehangtech.designpattern.行为型_策略模式;

import com.yehangtech.designpattern.行为型_策略模式.service.Context;
import com.yehangtech.designpattern.行为型_策略模式.service.ZJCouponDiscount;

import java.math.BigDecimal;

public class Main {
    public static void main(String[] args) {
        // 直减；100-10，商品100元
        Context<Double> context = new Context<Double>(new ZJCouponDiscount());
        BigDecimal discountAmount = context.discountAmount(10D, new
                BigDecimal(100));
        System.out.println(discountAmount);
    }
}
